@typeparam            T
@using BlazorApp.Pages.Common.Metadata
@using BlazorApp.Utils
@using Extension
@using k8s.Models
@inherits BlazorApp.Pages.Common.PageBase

<div class="default-node ">


    @foreach (var port in Node.Ports.Where(x => x.Alignment == PortAlignment.Left))
    {
        <PortRenderer @key="port" Port="port" Class="default"/>
    }


    @foreach (var port in Node.Ports.Where(x => x.Alignment == PortAlignment.Right))
    {
        <PortRenderer @key="port" Port="port" Class="default"/>
    }

    <div style="width: 260px;">
        <GridRow Style="align-items: center" Gutter="8">
            <GridCol Span="5" Style="font-size: 18px">
                <div class="left-region">
                    <div class="icon">
                        <Icon Type="@GetIcon(_typeName)" Theme="fill" Style="font-size: 30px;color: #31bdec"/>
                    </div>

                    <div class="status">
                        <ReadyIconView Ready="@GetReadyStatus(Node.Item)"></ReadyIconView>
                        <ProcessingIconView Processing="@GetProcessingStatus(Node.Item)"></ProcessingIconView>
                    </div>
                </div>
            </GridCol>
            <GridCol Span="19">
                <div class="long-text">@(_resName)</div>
                <div>
                    <RefView
                        Ref="@(KubeHelper.GetObjectRef(Node.Item?.Kind, Node.Item?.Namespace(), Node.Item?.Name()))">
                    </RefView>
                </div>
            </GridCol>

        </GridRow>
    </div>
    <div class="time-ago">
        <div class="center">@Node.Item.CreationTimestamp().AgeFromUtc()</div>
    </div>
</div>
